uniform sampler2D tex_screen;
uniform vec4 env_screenSize;

void main(void) {
	vec4 cl = texture2D(tex_screen, vec2(gl_FragCoord.x / env_screenSize.x,
			gl_FragCoord.y / env_screenSize.y));

	int steps = 2;
	int counter = steps*4+2;

	vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);

	for (int y = -steps; y <= steps; ++y) {
		sum += texture2D(tex_screen, vec2((gl_FragCoord.x)
				/ env_screenSize.x, (y + gl_FragCoord.y) / env_screenSize.y));
	}

	for (int x = -steps; x <= steps; ++x) {
		sum += texture2D(tex_screen, vec2((x + gl_FragCoord.x)
				/ env_screenSize.x, (gl_FragCoord.y) / env_screenSize.y));
	}

	sum = vec4(sum.x / counter, sum.y / counter, sum.z / counter, 1.0);

	float grey = cl.x * 0.39 + cl.y * 0.50 + cl.z * 0.11 + 0.3;

	gl_FragColor = sum;// * (1.0-grey);
}
